import React from 'react';
import Loadable from 'react-loadable';

function Loading(props) {
  if (props.error) {
    return <div>Error!</div>;
  } else if (props.pastDelay) {
    return <div>Loading...</div>;
  } else {
    return null;
  }
}
const LoadableA = Loadable({
  loader: () => import('./CompA').then(object => object.default),
  loading:Loading,
  delay:2000
});

export default LoadableA;